﻿#region zh-CHS 2006 - 2010 DemoSoft 团队 | en 2006-2010 DemoSoft Team

//     NOTES
// ---------------
//
// This file is a part of the MMOSE(Massively Multiplayer Online Server Engine) for .NET.
//
//                              2006-2010 DemoSoft Team
//
//
// First Version : by H.Q.Cai - mailto:caihuanqing@hotmail.com

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published
 *   by the Free Software Foundation; either version 2.1 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

#region zh-CHS 包含名字空间 | en Include namespace
using System;
using Demo.Mmose.Core.Common;
using Demo.Mmose.Core.Common.SafeCollections;
using Demo.Mmose.Core.Entity.Item;
using System.Threading;
using Demo.Mmose.Core.Util;
using System.Collections.Generic;
#endregion

namespace Demo.Mmose.Core.Entity.Suit.Mail
{
    /// <summary>
    /// 
    /// </summary>
    public class ItemMailMessage<ItemT> : MailMessage
        where ItemT : ItemBase
    {
        #region zh-CHS 私有常量 | en Private Constants
        /// <summary>
        /// 
        /// </summary>
        //private readonly static int DICTIONARY_CAPACITY_SIZE = 16;
        #endregion

        #region zh-CHS 构造和初始化和清理 | en Constructors and Initializers and Dispose
        /// <summary>
        /// 
        /// </summary>
        public ItemMailMessage()
        {
            m_ItemContainer = new ItemContainer<ItemT>();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="serial"></param>
        public ItemMailMessage( long iMessageId )
            : base( iMessageId )
        {
            m_ItemContainer = new ItemContainer<ItemT>();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="serial"></param>
        public ItemMailMessage( long itemMinSlot, long itemMaxSlot )
        {
            m_ItemContainer = new ItemContainer<ItemT>( itemMinSlot, itemMaxSlot );
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="serial"></param>
        public ItemMailMessage( long iMessageId, long itemMinSlot, long itemMaxSlot )
            : base( iMessageId )
        {
            m_ItemContainer = new ItemContainer<ItemT>( itemMinSlot, itemMaxSlot );
        }
        #endregion

        #region zh-CHS 共有属性 | en Public Properties

        #region zh-CHS Payment属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 需要支付的金额
        /// </summary>
        private long m_Payment = 0;
        #endregion
        /// <summary>
        /// 需要支付的金额
        /// </summary>
        public long Payment
        {
            get { return m_Payment; }
            set { m_Payment = value; }
        }

        #endregion

        #region zh-CHS ItemContainer属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 道具邮件的容器
        /// </summary>
        private ItemContainer<ItemT> m_ItemContainer = null;
        #endregion
        /// <summary>
        /// 道具邮件的容器
        /// </summary>
        public ItemContainer<ItemT> ItemContainer
        {
            get { return m_ItemContainer; }
        }

        #endregion

        #endregion
    }
}
#endregion
